﻿using BruteForce.Screens.PlayingScreen.Panels;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace BruteForce.Animation
{
    public abstract class MapDrawableTransition : Transition
    {
        protected MapDrawableTransition(double duration)
            : base(duration)
        {
        }

        public abstract Texture2D Texture { get; }

        public abstract Vector2 WorldLocation { get; }

        public abstract float TextureScale { get; }

        public abstract float Rotation { get; }
        public abstract override void Interpolate(GameTime time);

        public override void StartTransition()
        {
            base.StartTransition();
            GamePanel.Current.MapDrawableTransitions.Add(this);
            OnTransitionDone += () => GamePanel.Current.MapDrawableTransitions.Remove(this);
        }
    }
}